package com.bangyu.monitor.core.log;

import ch.qos.logback.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy;

/**
 * @Auther: zhangxue
 * @Date: 19/11/12 22:21
 * @Description:
 */
public class AppTimeBasedFileNamingAndTriggeringPolicy<E> extends
        DefaultTimeBasedFileNamingAndTriggeringPolicy {
    private Integer multiple = 1;

    @Override
    protected void computeNextCheck() {
        nextCheck = rc.getEndOfNextNthPeriod(dateInCurrentPeriod, multiple).getTime();
    }

    public Integer getMultiple() {
        return multiple;
    }

    public void setMultiple(Integer multiple) {
        if (multiple > 1) {
            this.multiple = multiple;
        }
    }
}
